{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 作业\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 子程序设计 1\n",
    "某年级参加英语 4 级考试的有 250 名学生，试编写一程序完成 `60-69`，`70-79`，`80-89`，`90-100` 四个分数段的统计工作，要求用子程序完成对应分数段的人数统计工作。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "题设还是有些 bug 的不过无伤大雅, 就当是一场总分 100 分的考试了    \n",
    "生成 250 个 [0, 100] 的随机数作为考生成绩(虽然实际不可能是完全随机的就是了, 图省事了)    \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[90, 75, 26, 3, 8, 60, 86, 24, 93, 34, 60, 82, 16, 45, 74, 43, 88, 93, 56, 83, 12, 68, 31, 1, 49, 94, 19, 99, 32, 37, 12, 98, 17, 42, 43, 66, 47, 81, 6, 100, 99, 49, 75, 79, 14, 60, 38, 76, 0, 59, 51, 5, 96, 21, 47, 34, 45, 63, 59, 84, 45, 75, 11, 82, 2, 97, 43, 3, 18, 80, 24, 87, 17, 75, 43, 73, 42, 26, 96, 8, 51, 42, 20, 67, 3, 47, 67, 7, 99, 92, 93, 3, 51, 74, 22, 14, 100, 14, 10, 64, 80, 67, 23, 93, 85, 26, 82, 99, 54, 10, 20, 26, 83, 68, 26, 20, 2, 67, 53, 86, 28, 7, 88, 21, 73, 25, 36, 93, 38, 49, 27, 48, 19, 67, 63, 76, 88, 1, 26, 0, 101, 1, 39, 1, 94, 0, 83, 89, 27, 43, 88, 2, 28, 10, 20, 17, 80, 30, 9, 53, 60, 14, 48, 44, 26, 86, 88, 10, 27, 33, 51, 0, 97, 11, 46, 32, 10, 78, 68, 69, 73, 67, 101, 13, 87, 71, 13, 39, 84, 13, 54, 26, 9, 13, 5, 25, 76, 2, 9, 17, 21, 98, 12, 45, 43, 52, 79, 46, 27, 25, 4, 89, 3, 58, 92, 70, 53, 40, 53, 68, 15, 31, 93, 56, 92, 66, 99, 93, 26, 59, 85, 38, 58, 80, 11, 84, 58, 89, 78, 25, 57, 8, 25, 50, 78, 45, 18, 22, 33, 50]\n"
     ]
    }
   ],
   "source": [
    "from random import randint\n",
    "\n",
    "score_lst = list()\n",
    "for _ in range(250):\n",
    "    score_lst.append(randint(0,101))\n",
    "\n",
    "print(score_lst)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEVCAYAAADzUNLBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAf4UlEQVR4nO3df5xVdb3v8debX4YDKsIEIQii3KMoYjoheMBGkgx/R5bc/HHrHEW5kr/SjqXkSQvRm2S38geKYIociavm7zA9KBhWgNhR07KEB0IcB0FAxF/4uX+sNbAZ98gCZvZew34/Hw8erP1da+/5fEec93zXd63vUkRgZma2Na3KXYCZmbUMDgwzM8vEgWFmZpk4MMzMLBMHhpmZZeLAMDOzTBwYZgUk7Z/+3UfSsCL7x0r6lKQnJfWXdKmk3STdIunIrXx2t4w1DJFUVfB6F0mTJbUtcuyRkr5VpH2GpC9m+XpmWTkwzFKSjgNmShIQwCRJuzY4rA1wBfAhUAWMioi1wDDg9SKfeZSk2yTNA65J2+ZK+pOkv0ka3+D4KmAGsJ+k1pLaRMR7wDrggPSYdmmNAC8C35I0qsGXfj/9Y9Zk2pS7ALM8kNQKuBK4PJK7WV+T9AhwAzA6PeZTwHKSMOkE1AJPpyOLDhHx9/S4XdIf8gCDgJcj4qzCLwcMB44C9m9QyreAm0gCYhQwNv26bYGaNCd2AUYCSyPiTUmnAD+RdE/4TlxrRh5hmCU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f07ZzSZaiyOuyMFYhvDSI2XZKT0UNA/4CvJBOVr9G+swTkofsBPADkmdGTAQ+IFmB+DDgfT6+mORD6dIwk4C701FIL+DXEfFYs3bIbCscGGbbKSKWACcASFoA7BcRV6VBMjEi7pD0zyTLnfclWUjuEJLlYe5NP+bRBh97fES8m37m6SSjixuAB5u3N2Zb51NSZk3jFJJH6QJ0J3nOCRHxDMnDcJ4gndtIJ7QXkix//0cASYeSrH56m6TH04cRzSBZyK9bRLxSsp6YNcKBYbaDJJ0PfJg+MRGSJ7ItLTjkZpLAuILkyXT7AAeSPN/k0PSYKpLTV/8WEcOBNSSnrE4DXvO9GZYHDgyz7aTEfcDBwOlp25XA2cB96etOJEuW70+yTPUPSJYCn0AyKvmFpH0jYg7J4z7XSeoBPEXySN/PkDyU6ElJJ5awe2Yf48UHzXaApKr6JyZ+wjFtIuLDdFtAq/oViCUp/D+htRAODDMzy8SnpMzMLBMHhpmZZeLAMDOzTBwYZmaWiQPDzMwy+f/9LkRtiZZIZwAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 将刚才生成好的数据再赋给 score_lst 一遍(毕竟是随机生成的,不存下来下次就不一样了)\n",
    "score_lst = [90, 75, 26, 3, 8, 60, 86, 24, 93, 34, 60, 82, 16, 45, 74, 43, 88, 93, 56, 83, 12, 68, 31, 1, 49, 94, 19, 99, 32, 37, 12, 98, 17, 42, 43, 66, 47, 81, 6, 100, 99, 49, 75, 79, 14, 60, 38, 76, 0, 59, 51, 5, 96, 21, 47, 34, 45, 63, 59, 84, 45, 75, 11, 82, 2, 97, 43, 3, 18, 80, 24, 87, 17, 75, 43, 73, 42, 26, 96, 8, 51, 42, 20, 67, 3, 47, 67, 7, 99, 92, 93, 3, 51, 74, 22, 14, 100, 14, 10, 64, 80, 67, 23, 93, 85, 26, 82, 99, 54, 10, 20, 26, 83, 68, 26, 20, 2, 67, 53, 86, 28, 7, 88, 21, 73, 25, 36, 93, 38, 49, 27, 48, 19, 67, 63, 76, 88, 1, 26, 0, 101, 1, 39, 1, 94, 0, 83, 89, 27, 43, 88, 2, 28, 10, 20, 17, 80, 30, 9, 53, 60, 14, 48, 44, 26, 86, 88, 10, 27, 33, 51, 0, 97, 11, 46, 32, 10, 78, 68, 69, 73, 67, 101, 13, 87, 71, 13, 39, 84, 13, 54, 26, 9, 13, 5, 25, 76, 2, 9, 17, 21, 98, 12, 45, 43, 52, 79, 46, 27, 25, 4, 89, 3, 58, 92, 70, 53, 40, 53, 68, 15, 31, 93, 56, 92, 66, 99, 93, 26, 59, 85, 38, 58, 80, 11, 84, 58, 89, 78, 25, 57, 8, 25, 50, 78, 45, 18, 22, 33, 50]\n",
    "# 初始化各分段数量\n",
    "score60, score70, score80, score90, score_fail = 0, 0, 0 ,0, 0\n",
    "for i in score_lst:\n",
    "    if i < 60:  score_fail += 1\n",
    "    elif i < 70:  score60 += 1\n",
    "    elif i < 80:  score70 += 1\n",
    "    elif i < 90:  score80 += 1\n",
    "    else:  score90 += 1\n",
    "\n",
    "from matplotlib import pyplot as plt\n",
    "%matplotlib inline\n",
    "from numpy import array\n",
    "plt.rcParams['font.family'] = ['SimHei']\n",
    "plt.xlabel(\"分数段\")\n",
    "plt.ylabel(\"人\\n数\", rotation=0, labelpad=20)\n",
    "plt.title(\"分数段统计\")\n",
    "\n",
    "tick_x = array(range(1,6))\n",
    "name_lst = [\"不及格\", \"60~70\", \"70~80\", \"80~90\", \"90~100\"]\n",
    "tick_y = [score_fail, score60, score70, score80, score90]\n",
    "\n",
    "plt.bar(tick_x, tick_y, tick_label = name_lst)\n",
    "for a, b in zip(tick_x, tick_y):\n",
    "    plt.text(a, b+0.5, str(b), size = 12)\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "be333bfaf4b40d9f2128eb06ccf81a284655b9f6c456fc22510d92c5f9e0d280"
  },
  "kernelspec": {
   "display_name": "Python 3.8.5 64-bit ('base': conda)",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
